<template>
  <h1>就不让你调试，气不气</h1>
  <div class="back">
    <el-button @click="router.back()">返回</el-button>
  </div>
</template>
<script setup>
import { ElMessage } from "element-plus";
import { useRouter } from "vue-router";

// 方法一: 无限debugger
(() => {
  function ban() {
    setInterval(() => {
      debugger;
    }, 50);
  }
  try {
    ban();
  } catch (err) {}
})();

const router = useRouter();
// 方法二：判断浏览器宽高
// (() => {
//   function block() {
//     if (
//       window.outerHeight - window.innerHeight > 200 ||
//       window.outerWidth - window.innerWidth > 200
//     ) {
//     }
//     setInterval(() => {
//       (function () {
//         return false;
//       })
//         ["constructor"]("debugger")
//         ["call"]();
//     }, 50);
//   }
//   try {
//     block();
//   } catch (err) {}
// })();
</script>
<style scoped>
h1 {
  font-size: 3em;
  text-align: center;
  background: linear-gradient(
    90deg,
    #ff0000,
    #ff7f00,
    #ffff00,
    #00ff00,
    #0000ff,
    #4b0082,
    #9400d3
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow 5s ease infinite;
}

@keyframes rainbow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.back {
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>
